function uploadImageCommon(form_id,input_id) {
    var formData = new FormData($( "#"+form_id )[0]);
    $.ajax({
        url: '/home/Upload/uploadImg',
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                return true;
            }else{
            	alert(returnData.msg);
            	return false;
			}
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}
function uploadImageCommon1(form_id,input_id) {
    var formData = new FormData($( "#"+form_id )[0]);
    $.ajax({
        url: '/home/Upload/uploadImg1',
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                return true;
            }else{
                alert(returnData.msg);
                return false;
            }
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}
function uploadImageCommon2(form_id,input_id) {
    var formData = new FormData($( "#"+form_id )[0]);
    $.ajax({
        url: '/home/Upload/uploadImg2',
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                return true;
            }else{
                alert(returnData.msg);
                return false;
            }
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}
function uploadImageCommon3(form_id,input_id) {
    var formData = new FormData($( "#"+form_id )[0]);
    $.ajax({
        url: '/home/Upload/uploadImg3',
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                return true;
            }else{
                alert(returnData.msg);
                return false;
            }
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}
function uploadVideoCommon(form_id,input_id) {
    var formData = new FormData($( "#"+form_id )[0]);
    $.ajax({
        url: '/home/Upload/uploadVideo',
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                $('#srcvideo').attr('src',returnData.msg);
                $('#showvideo').removeClass('hidden');
                $('.havevideo').text('上传完成！');
                return true;
            }else{
            	alert(returnData.msg);
                $('.havevideo').text(returnData.msg);
            	return false;
			}
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}